import { HelloHandler, HelloJacksonHandler, VerifyHandler } from "../msgHandlers/HelloHandler";
import { HelloCmd, LoginCmd } from "./CmdData";


import HandleMgr from "./HandleMgr";

export default class RegisterMgr {

  private static _ins: RegisterMgr;

  public static get ins(): RegisterMgr {
    if (!this._ins) this._ins = new RegisterMgr();
    return this._ins;
  }

  //注册协议
  public registCmd(): void {
    HandleMgr.addHandler(HelloCmd.Cmd, HelloCmd.Sub_Here, new HelloHandler())
    HandleMgr.addHandler(HelloCmd.Cmd, HelloCmd.Sub_Jackson, new HelloJacksonHandler())
    HandleMgr.addHandler(LoginCmd.Cmd, LoginCmd.Sub_Verify, new VerifyHandler())
  }

}
